package com.sky.context;

//初始工程中已经封装了 ThreadLocal 操作的工具类：
public class BaseContext {
    /**
     * 线程本地变量
     */

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
